<?php
/** 
 * 主题函数
 * @package WordPress
 * @subpackage wheatv
 */
	
add_theme_support( 'automatic-feed-links' );

/*定义特色缩略图尺寸*/
add_theme_support('post-thumbnails');
if ( function_exists( 'add_image_size' ) ){  
	add_image_size( 'post', 72, 62,true);
}

/*注册自定义菜单*/
register_nav_menus(array('primary_navi' => '主导航'));

/*注册小工具区域*/
function wheatv_widgets_init() {
	register_sidebar(array(
		'name' => __( '侧栏区域', 'wheatv' ),
		'id' => 'sidebar-widget',
		'before_widget' => '<div class="widgetbox">',
		'after_widget' => '</div>',
		'before_title' => '<div class="clumn_1"><strong>',
		'after_title' => '</strong></div>',
	));
}
add_action( 'widgets_init', 'wheatv_widgets_init' );


/**
自定义评论输出样式
从HTML部分开始修改
**/
function wheatv_custom_comments($comment, $args, $depth){
  $GLOBALS['comment'] = $comment; ?>
  <li id="li-comment-<?php comment_ID() ?>">
            <p><?php echo get_avatar($comment,$size='33',$default='<path_to_url>'); ?><strong><?php printf(__('%s'),get_comment_author_link());?></strong><em>发表于 <?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></em></p>
            <span>
             <?php if ($comment->comment_approved == '0') : ?>
                <em>
                <?php _e('您发表的评论正在等待审核……') ?>
                </em> <br />
                <?php endif; ?>
                <?php comment_text();?>
            </span>          
  </li>
<?php }
?>